#include "../include/SplitToolCppjieba.h"
//#include "cppjieba/Jieba.hpp"

#include <vector>
#include <string>

using std::vector;
using std::string;

//最大概率法分词所使用的词典路径
const char* const DICT_PATH = "../include/cppjieba/dict/jieba.dict.utf8";
//隐式马尔可夫模型分词所使用得词典路径
const char* const HMM_PATH = "../include/cppjieba/dict/hmm_model.utf8";
//用户自定义词典路径
const char* const USER_DICT_PATH = "../include/cppjieba/dict/user.dict.utf8";
//IDF路径
const char* const IDF_PATH = "../include/cppjieba/dict/idf.utf8";
//停用词路径
const char* const STOP_WORD_PATH = "../include/cppjieba/dict/stop_words.utf8";

SplitToolCppjieba::SplitToolCppjieba()
:_jieba(DICT_PATH,HMM_PATH,USER_DICT_PATH,IDF_PATH,STOP_WORD_PATH)
{
    
}


SplitToolCppjieba::~SplitToolCppjieba()
{

}
#if 0
vector<string> SplitToolCppjieba::operator()(const string str)
{
    vector<string> words;
    _jieba.CutAll(str,words);
    return words;
}
#endif

vector<string> SplitToolCppjieba::cut(const string& str)
{
    vector<string> words;
    _jieba.CutAll(str,words);
    return words;
}


